<div class="menus index">
<h2><?php __('Menus');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<table class="widefat fixed" cellspacing="0">
<thead>
<tr>
	<th width="50px"><?php echo $paginator->sort('id');?></th>
	<th width="100"><?php echo $paginator->sort('module_id');?></th>
	<th width="175"><?php echo $paginator->sort('label');?></th>
	<th><?php echo $paginator->sort('link');?></th>
	<th class="actions" align="center"><?php __('Actions');?></th>
</tr>
</thead>
<?php
$i = 0;
foreach ($menus as $menu):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td align="center">
			<?php echo $i; ?>
		</td>
		<td>
			<?php echo $html->link($menu['Module']['name'], array('controller' => 'modules', 'action' => 'view', $menu['Module']['id'])); ?>
		</td>
		<td align="left">
			<?php echo $menu['Menu']['label']; ?>
		</td>
		<td>
			<?php echo $menu['Menu']['link']; ?>
		</td>
		<td class="actions">
			<?php echo $html->link($html->image('view.png'), array('action' => 'view', $menu['Menu']['id']), array('title'=>'See The Complete Data'),false,false); ?>
			<?php echo $html->link($html->image('update.png'), array('action' => 'edit', $menu['Menu']['id']),array('title'=>'Update Data'),false,false); ?>
			<?php echo $html->link($html->image('delete.png'), array('action' => 'delete', $menu['Menu']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $menu['Menu']['id']),false); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('previous', true), array('tag'=>'span'), null, array('tag'=>'span','class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('next', true).' >>', array('tag'=>'span'), null, array('tag'=>'span','class' => 'disabled'));?>
</div>
<div class="actions">
 
	 <div id="favorite-actions2"><?php echo $html->link(__('New Menu', true), array('action' => 'add')); ?></div>
	 <div id="favorite-actions2"><?php echo $html->link(__('List Modules', true), array('controller' => 'modules', 'action' => 'index')); ?></div>  
	 <div id="favorite-actions2"><?php echo $html->link(__('New Module', true), array('controller' => 'modules', 'action' => 'add')); ?></div>  
	
</div>
